package com.moioo.exam;

import java.util.HashSet;
import java.util.Set;
import java.util.List;
import org.apache.struts.action.ActionForm;

public class TSurveyType extends ActionForm implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7984564084278278654L;
	
	private Integer id;
	private Integer surveyid;
	private String title;
	private String info;
	private List<TSurveyTm> tms= null;
	
	/* [CONSTRUCTOR MARKER BEGIN] */
	public TSurveyType() {
		super();
	}

	public Integer getId() {
		return this.id;
	}

	public Integer getSurveyid() {
		return this.surveyid;
	}
	
	public String getInfo(){
		return this.info;
	}
	public String getInfostr()
	{
		if (this.info==null)return null;
		return this.info.replaceAll("\n", "<br>");
	}
	public String getTitle() {
		return this.title;
	}
	public List<TSurveyTm> getTms()
	{
		if (this.tms==null)
		{
			this.tms=TSurveyTm.getDAO().findByType(this.id);
		}
		return this.tms;
	}
	
	public void setId(Integer id) {
		this.id=id;
	}

	public void setSurveyid(Integer surveyid) {
		this.surveyid=surveyid;
	}

	public void setTitle(String title) {
		this.title=title;
	}
	public void setInfo(String info){
		this.info=info;
	}
	@Override
	public String toString() {
		return super.toString();
	}
	
	public static TSurveyTypeDAO getDAO() {
		return new TSurveyTypeDAO();
	}
	/* [CONSTRUCTOR MARKER END] */

}